Skip to content

optimized app to include code to download the binary and modify permissions in function initialization phase#1

Open
dm-chelupati wants to merge 3 commits intopaulyuk:mainfrom
dm-chelupati:main
Open

optimized app to include code to download the binary and modify permissions in function initialization phase#1
dm-chelupati wants to merge 3 commits intopaulyuk:mainfrom
dm-chelupati:main

Conversation

@dm-chelupati
Copy link
Copy Markdown

added init_ffmpeg and init.py files

Comment thread function_app.py
def main(req: func.HttpRequest) -> func.HttpResponse:
# Azure File Share connection details
storage_account_name = os.getenv('AZURE_STORAGE_ACCOUNT_NAME')
container_name = 'azurefiles'
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we rename to ffmpegfiles or something like that to not confuse with Azure Files service?

Comment thread function_app.py
storage_account_name = os.getenv('AZURE_STORAGE_ACCOUNT_NAME')
container_name = 'azurefiles'
blob_name = 'ffmpeg'
local_ffmpeg_path = '/tmp/ffmpeg'
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if this works on Windows. I can try later tonight.

Comment thread function_app.py
download_stream = blob_client.download_blob()
file_handle.write(download_stream.readall())
from init_ffmpeg import initialize_ffmpeg
initialize_ffmpeg()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if and when we move to warm up triggers, i think this new function would need to be called warmup, and you would not call it from this function so it can be independent (but we should verify).

However since warmup trigger is not used yet, this looks good.

Comment thread macffmpeg/ffmpeg
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the goal of this is to initalize the files in blob storage with the right standalone distribution of ffmpeg, are we better off instead creating Pre-req steps in the readme instructing user to first create and then copy , , and to that container? Also did we miss Windows? That's pretty common.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants